<?php

declare(strict_types=1);

namespace App\CustHub\Mapper;

use App\CustHub\Model\ChContactBlack;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Model;
use Mine\Abstracts\AbstractMapper;
use Mine\MineModel;

class ChContactBlackMapper extends AbstractMapper
{
    public function assignModel()
    {
        $this->model = ChContactBlack::class;
    }

    public function findByUserId($mainUid,mixed $userId): MineModel|Model|string|Builder|null
    {
        return $this->model::query()->where('main_uid',$mainUid)->where('user_id', $userId)->first();
    }
}